libvchan: Read prod/cons only once.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 20 Nov 2015 17:22:14 +0000 (12:22 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 18 Dec 2015 14:50:02 +0000 (09:50 -0500)
commit7d66a4ba695ab8d13b214fb816dd59e443ae1ec9
treebcc48571b4ecb2e9579c21e430d56a5ab98e76f0
parent19f6c522a6a9599317ee1d8c4a155d1400d04c89
libvchan: Read prod/cons only once.

We must ensure that the prod/cons are only read once and that
the compiler won't try to optimize the reads. That is split
the read of these in multiple instructions influencing later
branch code. As such insert barriers when fetching the cons
and prod index.

This is part of XSA155.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
tools/libvchan/io.c